package com.hjm.project.profitSummary.profitSummary.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hjm.project.profitSummary.profitSummary.mapper.ProfitSummaryMapper;
import com.hjm.project.profitSummary.profitSummary.domain.ProfitSummary;
import com.hjm.project.profitSummary.profitSummary.service.IProfitSummaryService;
import com.hjm.common.utils.text.Convert;

/**
 * 日分润汇总Service业务层处理
 * 
 * @author LOVE
 * @date 2020-11-27
 */
@Service
public class ProfitSummaryServiceImpl implements IProfitSummaryService 
{
    @Autowired
    private ProfitSummaryMapper profitSummaryMapper;

    /**
     * 查询日分润汇总
     * 
     * @param id 日分润汇总ID
     * @return 日分润汇总
     */
    @Override
    public ProfitSummary selectProfitSummaryById(Long id)
    {
        return profitSummaryMapper.selectProfitSummaryById(id);
    }

    /**
     * 查询日分润汇总列表
     * 
     * @param profitSummary 日分润汇总
     * @return 日分润汇总
     */
    @Override
    public List<ProfitSummary> selectProfitSummaryList(ProfitSummary profitSummary)
    {
        return profitSummaryMapper.selectProfitSummaryList(profitSummary);
    }

    /**
     * 新增日分润汇总
     * 
     * @param profitSummary 日分润汇总
     * @return 结果
     */
    @Override
    public int insertProfitSummary(ProfitSummary profitSummary)
    {
        return profitSummaryMapper.insertProfitSummary(profitSummary);
    }

    /**
     * 修改日分润汇总
     * 
     * @param profitSummary 日分润汇总
     * @return 结果
     */
    @Override
    public int updateProfitSummary(ProfitSummary profitSummary)
    {
        return profitSummaryMapper.updateProfitSummary(profitSummary);
    }

    /**
     * 删除日分润汇总对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteProfitSummaryByIds(String ids)
    {
        return profitSummaryMapper.deleteProfitSummaryByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除日分润汇总信息
     * 
     * @param id 日分润汇总ID
     * @return 结果
     */
    @Override
    public int deleteProfitSummaryById(Long id)
    {
        return profitSummaryMapper.deleteProfitSummaryById(id);
    }
}
